﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:Converter="clr-namespace:Wpf.Core.Converter;assembly=Wpf.Core"
                    xmlns:sys="clr-namespace:System;assembly=mscorlib">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/Module.Splash;component/Resource/ImageResource.xaml"/>
    </ResourceDictionary.MergedDictionaries>
    
    <Converter:AddMarginConverter x:Key="addMarginConverter" />
    <Converter:WindowCenteredPositionConverter x:Key="windowCenteredPositionConverter" />

    <sys:Double x:Key="ContentHeight">280.0</sys:Double>
    <sys:Double x:Key="ContentWidth">400.0</sys:Double>

    <Style x:Key="SplashWindowStyle" TargetType="{x:Type Window}">
        <!--<Setter Property="Title" Value="Application Title" />-->
        <Setter Property="Icon" Value="{StaticResource SplashIcon}" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Foreground" Value="White" />
        <Setter Property="Margin" Value="0" />
        <Setter Property="Padding" Value="0" />
        <Setter Property="ShowInTaskbar" Value="True" />
        <Setter Property="ResizeMode" Value="CanMinimize" />
        <Setter Property="WindowState" Value="Normal" />
        <Setter Property="Topmost" Value="False" />
        <Setter Property="SnapsToDevicePixels" Value="True" />
        <Setter Property="OpacityMask" Value="DarkGray" />
        <Setter Property="SizeToContent" Value="Manual" />
        <Setter Property="AllowsTransparency" Value="True" />
        <Setter Property="WindowStyle" Value="None" />
        <Setter>
            <Setter.Property>Top</Setter.Property>
            <Setter.Value>
                <MultiBinding Converter="{StaticResource windowCenteredPositionConverter}">
                    <Binding Path="Height" Source="{x:Static SystemParameters.WorkArea}"/>
                    <Binding Path="Top" Source="{x:Static SystemParameters.WorkArea}"/>
                    <Binding Source="{StaticResource ContentHeight}" />
                </MultiBinding>
            </Setter.Value>
        </Setter>
        <Setter>
            <Setter.Property>Left</Setter.Property>
            <Setter.Value>
                <MultiBinding Converter="{StaticResource windowCenteredPositionConverter}">
                    <Binding Path="Width" Source="{x:Static SystemParameters.WorkArea}"/>
                    <Binding Path="Left" Source="{x:Static SystemParameters.WorkArea}"/>
                    <Binding Source="{StaticResource ContentWidth}" />
                </MultiBinding>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="SplashText" TargetType="{x:Type TextBlock}">
        <Setter Property="Foreground" Value="#333333"/>
        <Setter Property="FontFamily" Value="Verdana" />
        <Setter Property="FontWeight" Value="Bold" />
        <Setter Property="FontSize" Value="13" />
    </Style>
    
</ResourceDictionary>